package org.rapidpm.demo.cdi.commons.logger;

import javax.enterprise.inject.Produces;
import javax.enterprise.inject.spi.InjectionPoint;

import org.apache.log4j.Logger;

/**
 * User: Sven Ruppert
 * Date: 03.06.13
 * Time: 09:04
 */
public class LoggerProducer {

    /**
     * @param injectionPoint
     * @return logger
     */
    @Produces
    @CDILogger //Default Log4J
    public Logger produceLog4JLogger(InjectionPoint injectionPoint) {
        return Logger.getLogger(injectionPoint.getMember().getDeclaringClass().getName());
    }
}
